*******************************************	   
************* TABLE A12 leads of the treatment Placebo
*******************************************	   

clear all
clear matrix
set more off

* Data 
use "~/Dropbox/Replication_MVC/Datasets/datasets_analysis/panel_excombatientes.dta", clear 

sort id year 

g F_gold_shock_r = f.gold_shock_r
g F_mean_gold_shock_r = f.mean_gold_shock_r

eststo clear
set more off

reghdfe diffcaptures_f F_gold_shock_r F_mean_gold_shock_r, absorb(wartimenetwork year origmun) vce(cluster wartimenetwork)
estadd local ALLFE = "$\checkmark$"
summ diffcaptures_f if e(sample) ==1
estadd local meanDep = trim("`: display %12.4fc `r(mean)''")
estadd local SDDep = trim("`: display %12.4fc `r(sd)''")
eststo

reghdfe diffcaptures_f F_gold_shock_r F_mean_gold_shock_r age female black indigenous c.pobreza##i.time_t c.pobl_tot##i.time_t c.disbogota##i.time_t  c.paved_roads##i.time_t i.time_t##i.region, absorb( wartimenetwork year origmun) vce(cluster wartimenetwork)
estadd local ALLFE = "$\checkmark$"
estadd local TT = "$\checkmark$"
estadd local MT = "$\checkmark$"
estadd local BC = "$\checkmark$"
estadd local CO = "$\checkmark$"
summ diffcaptures_f if e(sample) ==1
estadd local meanDep = trim("`: display %12.4fc `r(mean)''")
estadd local SDDep = trim("`: display %12.4fc `r(sd)''")
eststo

reghdfe diffcaptures F_gold_shock_r F_mean_gold_shock_r, absorb(wartimenetwork year origmun) vce(cluster wartimenetwork)
estadd local ALLFE = "$\checkmark$"
summ diffcaptures if e(sample) ==1
estadd local meanDep = trim("`: display %12.4fc `r(mean)''")
estadd local SDDep = trim("`: display %12.4fc `r(sd)''")
eststo

reghdfe diffcaptures F_gold_shock_r F_mean_gold_shock_r age female black indigenous c.pobreza##i.time_t c.pobl_tot##i.time_t c.disbogota##i.time_t  c.paved_roads##i.time_t i.time_t##i.region, absorb( wartimenetwork year origmun) vce(cluster wartimenetwork)
estadd local ALLFE = "$\checkmark$"
estadd local TT = "$\checkmark$"
estadd local MT = "$\checkmark$"
estadd local BC = "$\checkmark$"
estadd local CO = "$\checkmark$"
summ diffcaptures if e(sample) ==1
estadd local meanDep = trim("`: display %12.4fc `r(mean)''")
estadd local SDDep = trim("`: display %12.4fc `r(sd)''")
eststo

esttab est* using "~/Dropbox/Replication_MVC/Paper_tables/TableA12.tex", se ///
	   star(* 0.10 ** 0.05 *** 0.01 ) ///
	   stats(meanDep SDDep N ALLFE TT MT BC CO, fmt(%12.4fc %12.4fc  %12.0fc %12.0fc %12.0fc %12.0fc  %12.0fc ) ///
	   label("\small Mean of Outcome" "\small S.D of Outcome" "\small Observations" "\small Municipality, Year, and Group FE" "\small Time Trends" "\small Region $\times$ Year"  ///
	   "\small Municipality Characteristics TT" "\small Individual Covariates" )) ///
	   keep(F_gold_shock_r F_mean_gold_shock_r) /// Remove line for Table A33
	   varlabels(F_gold_shock_r "Economic Shock" F_mean_gold_shock_r "Average Group Shock" ) ///
	   ti("Placebo Leads of Treatment") ///	  
	   replace 

// esttab est* using "~/Dropbox/Replication_MVC/Paper_tables/TableA33.tex", se ///
// 	   star(* 0.10 ** 0.05 *** 0.01 ) ///
// 	   stats(meanDep SDDep N ALLFE TT MT BC CO, fmt(%12.4fc %12.4fc  %12.0fc %12.0fc %12.0fc %12.0fc  %12.0fc ) ///
// 	   label("\small Mean of Outcome" "\small S.D of Outcome" "\small Observations" "\small Municipality, Year, and Group FE" "\small Time Trends" "\small Region $\times$ Year"  ///
// 	   "\small Municipality Characteristics TT" "\small Individual Covariates" )) ///
// 	   varlabels(F_gold_shock_r "Economic Shock" F_mean_gold_shock_r "Average Group Shock" ) ///
// 	   ti("Placebo Leads of Treatment") ///	  
// 	   replace 
	   
